package com.dragon.codefx.dataBase.dao;

import com.dragon.codefx.dataBase.entity.DatabaseConfigEntity;
import com.dragon.common.JpaDao;
import com.dragon.util.DaoModify;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 数据库配置 Dao 接口
 *
 * @author lsc
 * @version V1.0
 * @date 2025-6-20
 */
@Repository
public interface DatabaseConfigDao  extends JpaDao<DatabaseConfigEntity,Integer> {

    DatabaseConfigEntity findOneByUrlAndPort(String url, String port);


    @DaoModify
    @Query("delete from DatabaseConfigEntity where id in ?1")
    void deleteByIdList(List<Integer> idList);
}